package com.gedeshidai.shumadevelop.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName product
 */
@TableName(value ="product")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Product implements Serializable {
    /**
     * 商品id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long productId;

    /**
     * 商品名称
     */
    private String productName;

    /**
     * 库存（初始库存）
     */
    private Integer inStock;

    /**
     * 剩余库存
     */
    private Integer remainingStock;

    /**
     * 上线时间
     */
    private Date timeOn;

    /**
     * 下线时间
     */
    private Date timeOff;

    /**
     * 用户id
     */
    private Long userId;
    /**
     * 代理人
     */
    private String userProxy;

    /**
     * 店小二操作的状态:1.已编辑
2.已提交审核
     */
    private Integer productOwnerState;

    /**
     * 商品的审核状态:1：未审核
2：发起审核
3：审核通过
4：审核驳回
     */
    private Integer productCheckState;

    /**
     * 商品的上线状态:1：未上线
2：已下线
3：已上线
     */
    private Integer productOnlineState;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Product(Long productId, String productName, Integer inStock, Integer remainingStock, Date timeOn, Date timeOff, Long userId, String userProxy) {
        this.setProductId(productId);
        this.setProductName(productName);
        this.setInStock(inStock);
        this.setRemainingStock(remainingStock);
        this.setTimeOn(timeOn);
        this.setTimeOff(timeOff);
        this.setUserId(userId);
        this.setUserProxy(userProxy);
    }
}